package com.edu.bhu.admin.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.edu.bhu.common.core.domain.entity.SysUser;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.edu.bhu.common.annotation.Excel;
import com.edu.bhu.common.core.domain.BaseEntity;

/**
 * 租房记录对象 hou_record
 * 
 * @author zhangkeyi
 * @date 2022-02-22
 */
public class HouRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 租房记录唯一标识 */
    private Long recordId;

    /** 关联房屋id */
    @Excel(name = "关联房屋id")
    private Long houseId;
    private HouHouse houHouse;

    /** 关联用户id */
    @Excel(name = "关联用户id")
    private Long userId;
    private SysUser sysUser;

    /** 租房起始日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "租房起始日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 预定终止日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "预定终止日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 退房状态 1.未退房 2.已退房 */
    @Excel(name = "退房状态 1.未退房 2.已退房")
    private Long status;

    /** 总价 */
    @Excel(name = "总价")
    private BigDecimal price;

    /** 合同路径 */
    @Excel(name = "合同路径")
    private String contract;

    /** 租赁状态 */
    private Long rentStatus;

    public HouRecord() {
    }

    public HouRecord(Long houseId, Long userId, Date startTime, Date endTime, BigDecimal price) {
        this.houseId = houseId;
        this.userId = userId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.price = price;
    }

    public void setRecordId(Long recordId)
    {
        this.recordId = recordId;
    }

    public Long getRecordId() 
    {
        return recordId;
    }
    public void setHouseId(Long houseId) 
    {
        this.houseId = houseId;
    }

    public Long getHouseId() 
    {
        return houseId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setStartTime(Date startTime) 
    {
        this.startTime = startTime;
    }

    public Date getStartTime() 
    {
        return startTime;
    }
    public void setEndTime(Date endTime) 
    {
        this.endTime = endTime;
    }

    public Date getEndTime() 
    {
        return endTime;
    }
    public void setStatus(Long status) 
    {
        this.status = status;
    }

    public Long getStatus() 
    {
        return status;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setContract(String contract) 
    {
        this.contract = contract;
    }

    public String getContract() 
    {
        return contract;
    }

    public HouHouse getHouHouse() {
        return houHouse;
    }

    public void setHouHouse(HouHouse houHouse) {
        this.houHouse = houHouse;
    }

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }

    public Long getRentStatus() {
        return rentStatus;
    }

    public void setRentStatus(Long rentStatus) {
        this.rentStatus = rentStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("recordId", getRecordId())
            .append("houseId", getHouseId())
            .append("userId", getUserId())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("status", getStatus())
            .append("price", getPrice())
            .append("contract", getContract())
            .toString();
    }
}
